package com.ruoyi.redtea.dualprevent.service;

import com.ruoyi.redtea.dualprevent.domain.bo.TrainRiskPointControlWaysBo;
import com.ruoyi.redtea.dualprevent.domain.entity.TrainRiskPointControlWays;
import com.ruoyi.redtea.dualprevent.domain.entity.TrainRiskPointControlWaysAvatar;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author lgp
 * @description 针对表【train_risk_point_control_ways(风险点管控措施)】的数据库操作Service
 * @createDate 2024-05-15 13:09:44
 * @Desc 风险辨识分析单元的风险点
 */
public interface TrainRiskPointControlWaysService {

    List<TrainRiskPointControlWays> queryList();

    List<TrainRiskPointControlWaysAvatar> queryAvatarList();

    /**
     * 插入措施和排查项
     * @param controlWaysBo
     * @return
     */
    @Transactional(rollbackFor = Exception.class)
    boolean insertRiskPointControlWaysAndItem(TrainRiskPointControlWaysBo controlWaysBo);

    @Transactional(rollbackFor = Exception.class)
    boolean updateRiskPointControlWaysAndItem(TrainRiskPointControlWaysBo controlWaysBo);

    /***具体排查项的内容***/
    boolean insertOrUpdateBatchControlWayItem(Integer pointId, List<TrainRiskPointControlWaysBo.WaysItem> avatarList);

    boolean delControlWayItem(Integer itemId);
}
